Fix bug with widget visibility