Try to clean up undefined index problem