fixed issue where the app would crash on exit when pixel was not connected