fix log post logic