fixed bug where app would crash when going from tab 3 to tab 1 then back to tab 3 again