Fixed an error in position button function.