fix case sensitivity, variable references