fixed some stuff from code