Solved problem with empty list