Fixed /submit functionality