fix previous commit for linux, and cleanup some profile behaviors