Fix variable references

#2