Fix for avoiding using a nil key