fix rescue and ensure blocks (close #374)
changes