fixed nullpointerreference bug, removed some other debugging