Added check to ensure the current profile exists, and if not attempt to use the default.