Fix widget view error and None type error