Added row reidexing, otherwise wrong data is sent to backend.

Added row reidexing, otherwise wrong data is sent to backend.