fixed one of the crash issues