javascript: error message fixed