$procedure now closes statements after $read()