fixed lock wait and replaced Utilities.jsonParse

Utilities.jsonParse was deprecated - changed to JSON.parse