Fixed a typo
Undefined variable when recalculating levels