Merge pull request #2 from icedmilo/master

Now it can also work on the flexible side-chain.