Fixed many bugs related to recent update.