Exception while calling dynamic widgets