fixed wta_params and sqrt 0 bugs