fixing a type causing runtime exception.