Minor bugfix for crashing on refresh