fix bugs with new adapter