Fixed bug where returned metadata value was not taken to be a list
Fixed bad logic in fix
Switched implementation to use an array instead of a list