Fixed memory leak issue.
Updated test and travis setting.