Fix problems in warning log; fixes #2564