FIX: Added parameter array checking

Added some more debug code.