fix contributed by Open francoisjacques in #131