fix unexpected Runtime Exception