fixes #32, #33, #34