char conversion main problem fixed