Fixed JS issue on newly added widgets

Signed-off-by: Elliot Condon <e@elliotcondon.com>