Fix missing require
Bug fixes