fixed negative array exception