fixed bug while pausing/resuming gameplay