fix with proper key length