Program on windows is faulty probably due to jvm bug.