Fix bug in FIRST set function