fix protected runtime error