Fix regressions affecting compilation

This fixes two regressions, caused by #1167 and #1191 .
Merge pull request #1277 from thinkyhead/fix_regressions

Fix regressions affecting compilation