fix for restore view crash