fix bugs in move_to_trash