Quick Fix for Custom Fields area

Changed the code to fix the "undefined index" error that was being
thrown in the custom fields area.