tiny fix and more error debug msg stuff