Fix redirect to maintenance page when patching