Fixing error when try to add an array which not exist