Fix the move-material not working  bug.