Fixed crash related to nil key