Fix the java bug on paintings index