Fixes #341 Magnifier not respecting screen bounds

Fixes issue #341