several minority bug fixes