bug fixes

fixed deletion crashing bugs