got rid of empty arrays in dictionary