Partial fix for issue 46