Check and make sure the stack has views in it before popping

Fixes #8 (hopefully)