bug fix (finally got it!)