Issue33 bug in valve

see #36. Sorry for the outdated issue number and the wrong pull request...