Fixed logic in update(deltaTime)