avoid javascript exceptions when running offline