fixed initialisation of client