Fix bug when the table is empty + Prevent duplicate fields -- Fix #13