Finally resolved unchecked cast issues