fixed some mistakes by rapus