Added more error handling for if bad profiles are loaded