[#65] Stop duplicate tables
[#65] Unit test
fixes #65