Is it in a while loop? If so, change while to if.
return(); might also fix it.