Fix issues with profile script