cleaner initialization for library to avoid memory leak
fixed conflict