Fix bug in all method