Correct NSrunloop code to make sense