calling delegate callback when manually dismissing