Fix micro bug
Replaced boolean with state var