logical error

if statement correction