Fixed OutOfBoundsException in reading Map