fix profile location + minor code changes