Fix cursor leak
Working demo
Proper start and end times
Now works
Done.