fixing log stuff