fix behavior / add debug feature