Fixes issue when js is disabled (or ?plain is given)