fix for crash error