Key bug fix