Fixes undefined index error in control panel