Fixed small js error related to MODE on startup