fix routes lifecycle