fixes #242 and #243