Changed variable name
Fixed compiler issues