Remove useless multiple getFirstValue calls, close #341