Changes to get working offline properly