Fixed forgotten toMap method