fixed debug, which does seem necessary