Fixed crashes in eclipse