Custom widget init code update