Fix bug where the last statement of a list would not be evaluated properly