fixed bugs on arrays and sections