Fixing some errors
Fixed the issues with keys