updating to api version 2, start looking for segfault error
fixing seg fault on exit on ubuntu.