fix error handler
init client side stuff