Fixed sorting and previously bad implemented updateRow method