fix router and pdf generator