Fixed an undefined error with dynamic tabs