Fix a minor issue that was causing a crash in certain situations