Fixed delete views to function properly