Implemented fix #152 by user EdwardTuring