Fixes error with missing variable