should fix undefined variables