Bug fix on empty list