Added a bit more handling to the drop code