Fixes incorrect if statement breaking everything.

Also, fixes #279
Merge remote-tracking branch 'origin/master' into bootstrap