Fixed a nullpointer exception I made and a concurrent modification exception.