fix unless logic