fixed for/end scoping issue for single lines