fix implementation errors