fix for undefined variables