Re-added Array Checking

Re-added array checking in main.c.