Replaced all lockTables with startTransaction