Fixed an issue which caused grunt watch to hang when updating JS files.