fix undefined var close tag