fixed pairs error in OnEntityCreated