Fixed bugs, still no idea why no exception is thrown (java bug?)