Fixes found by @oni-link