fix logging a little