Fixed problem with missing variable