fix for rare crash error