fixing casting issue from factor to int/char