Fix checks on end of line (apply the idea of streams…).