Patch for nonempty types

Fixes issue #4