fixes #120 and #121