Fixed adapter cast exeception