bug fixes, tests still broken