fixes the codes