bug fixes, almost at the finish line