fixed some bugs with these files