bug fix to rep