Implement better fix for issue #14