Fix keys size check