fixed js lint issue for #252, #158 fixes