fixing modal tab behaviour bug