fix bugs on adapters