fix for random crash