Fixed startup crash... New function