fixed an old never seen logical error