Implemented a potential fix for #229