alternative solution to issue 1610, thanks Alan