corrected bugs to precedent commit