Correctly handle profile update

Fixes #1