fixing bug for table