fixes #15 and fixes #14