3.0: fixed a bad variable naming
3.0: updated