bugfix event input end time margin (thanks to Saman)