Fixed some issue related to attaching and detaching results from all()