Fixing bug for issue #13

Bug occurs when the window doesn't have any views in it yet