Fixed the game loop

Fixed update and render counting and added debug information