fix typo in chain test
increment version to 0.4
fix compiler errors for production release