some tweaking for profile and flash messages