Fix bug with variables array.