fix character generator bug