Prevent some crashing