Fixed odd crash bug with some versions of Java