fixed derefence when comparing types