Fix overflow and previews

Fixes #16 
Fixes #18