fixes #111 and #113