Various debugging and adapt to modified APIs