SUP-5473 fixed code after Brian's review