Bugfixes in form submission

replaced all instances of something instead of the first instance of
something, changed value of form keys and added trailing slash