bug if line is not valid