BUG: fixing pointer name in a more general way