bug fixes. Other problems added