fixed some loging issues