fix isLine logic (from jfire)