fix key size problem