Added online/offline override if undefined, probably should think of a better way