fixed some issues regarding logging