improved fix, Matthew's suggestion

please merge into 6.1.1