Fixed do end mismatch