Fixed null reference and map loading.