Build distribution, fix unit test