Improve parsing for widgets