Fix overflow and previews

Addresses #16 and #18
Merge pull request #22 from jcreedon/dev

Fix overflow and previews