Fixed errors when inserting gadgets