fixed a lot of bugs with characters