bug in is_viewable
fix commit errors