fixed the error with nil maps?