this fixes #137 and #272