This fixes #14 and #13