Fix missing key check