Functions added for debugging.