work around awt HeadlessEcxeption