added some debugging From Nvertigo