fix cast to char bug