minor fix on empty list bug