fixed a bug with non-existent code blocks.