taking care of didInsertElement issues