Got rid of unnecessary conversion to booleans