indexing error in begin trans fixed