Fixed bdelete problem