Correct compatibility with Java6