Fix render test and an end of line corner case