Remove asInstanceOf call