Fixed bug with entities_controller during merge