Added block-exit function.