Patch to #288 to fix broken view tests