Avoids some compiler warnings

Thanks to @rivy for the report/patch!