Fix error in table for database insertation