Assetman JS function fix