Fix Undefined index/variable & use $do