fixing errors occurring because Object.clearErrors doesn't use set when setting errors property