fix: javascript msg() function