Removed unnecessary asInstanceOf