attempt at bug fix