fixed unchecked cast compiler issue