why is the submit causing segfaults?