Prevent modal screen overflow

Fixes #288