Fix proposed for issue #1, expect() function fixed