ticket 174 bug fix