Fixed bug causing empty slices and maps to not be properly encoded