expose some more variables; bug fix for undefined