Enhance wrap-in-block function.