Code

Updated class tab, ensure that the selecte tab (current) is valid: