Fixed problem where routing callbacks could not set optional parameters, closes #579