fixes with debug messages