fix a logic error

Signed-off-by: Joe Buck <jbbuck@gmail.com>