Fix bug - missing name when construct widget from class