fix some bugs, add pause menu