clean up infinite looping