fix demo and improve code coverage
version 1.3.1