Fixed a little bit bug and added positioning function.