Fixes undefined variables error