fixes #25 and fixes #28