bug fixes, some remain