fixed a lil bug with the pitrap, and someother bugs