correctly close the code block