solving  problem with char array to short