Solved some errors

Errors related with arrays.
Another minor errors.