Fix #2355 previous fix wasn't entirely correct - thanks Thomas Hipp