Fix insert empty record into database