fix repositioning

add on_pos handler to change position correctly