Fix improper Adapter impl that caused crashes.