Fixes logic error in #233