corrected code to select default tab on application open.