fixes issue with return vs continue