FIX: timeout & memleak