Fix  findOrCreate function