Fixed a bug in the function parse_array