Reverts some changes in Profile.cpp

I've already committed a better version of this fix to SVN and will get it from there.