Fixed logging in bug