Solved bugs on Adapter and Expander function