Build fix

Hi.

Just two small build fixes. More info is in the commit messages.

Thanks.