Small fix for checking key interval