Small change to Main loop