fixed wrong profile being updated