Minor bug fixed while deleting master records