bug fixes, balance saving