fix runtime exception