fix issue 339