Forced to hack 'keys' assertion on line 131 (3.3.1 uses this, but the lib is not up-to-date)