Fixed delegate bug