minor fix to format string and js variable