Fix error (still not sure why it silently hangs)