Fix for when profile is null or undefined