Fixed event polling

This should have been kept as while, whoops.