Fixes incorrect if statement breaking everything.

Also, fixes #279