fix issue 508