Fix infinite loops (derp)