Restructured fix for issue 196.