Fixed many bugs related to array and mvc #8 #7