fix to check line number explicitly