Fixed potential infigite goto-loop