some fixes for debug