Fix issue with undefined user variable