bugfix

fixed error on submit causing session to break and sorted database query
alphaneumerically