Fix bugs in move