Fix overflow and previews

Addresses #16 and #18