Fix row selection error

To rewrite the main table view controller