fixing sql update queries, working more on revision mode validation