corrected weird bug with up and down