Added missing setting of loaded flag