Fix missing variable error