fixed an issue with creationg of empty JSON object