bug fix and missing require