bug fixes. data persistence