Work around silly java design limitation