Critical fix for buildKey