make sure the js var is initialized