Added key checks to other functions