Fixed bug with keys with ":" in them and added tests for it