fixed error when parameter was an array