fix cache & ws crashes