[master] added some error fixes.