repair some stupid mistakes