Debug code, will remove when stable.