Fixed bug with waittill.