Fixed IndexOutOfBoundsException of the last metadata piece was requested