fixed issues with logging