Fix: 'list' object has no attribute 'tolist'