Fixed the bug Charles found.