Replaces incorrect finally with then