NOT SURE ABOUT THIS: date seems undefined. Cause an error in submit.