Close code block properly