Fixed bug with time slice