fixed issues with delete