bug fix (finally)