Task #270 - Possible fix by turning key variable to an integer before using.