bug fixes, dumb logging