properly terminate code block