Fix a few errors and remove a debug message.