fixes an fatal error that if profile is not intialized, an error will throw