Fixed map loading if layer is empty