Fixes #1, makes sure views are unmapped when closed.

Not the most graceful fix I guess, but it works.