Removed empty rows in the end of two tables