Fixed logging a little bit.