fixes, logging prepared