Fixed exception with ArrayList