fix bug in upcase call