fix incorrectly formatted or out of range error