fixes for troopjs contrib