fix some leaks, updated to 0.4.1