Profile fix, some bugs