bug fixed for case 'g'