fix to static file generation
added url encoding
handling of missing params only triggers on undefined