Remove wrong call to method remove() for a dict