Fixing the submir handler when the JS is disabled.