added test and debug info for #265