Buildfixes part4v2

This is request without broken pointer patch. Looks like debug part of code should be deeply checked :)