Fix move-up/down problems