Loop syntax and bug fixing