Fix buildPage() 404 behaviour and improve params safety