SMall fixes and some better debug messages