Applied same fix to shw writer as reader.
Hacked up constants in test case to pass again.