fixed #9 relating to trash crashing