Minor change in main loop