fix  parameter being ignored when set to true

$array = true argument doesn't work as expected