Fix some peculiarities in code (told off by @houndci)