fix type generation exception