Fixed repositioning bug