coordinate idx out of range fixed