Fixed some logging stuff