make generation more permgen-safe