another stupid fix to key length. Temporary patch, but needs to be addressed further