fix runtime error