fix segfault
read with params