Fix condition of check that fixes #144. Close #148.