Close statement after executing