fixed newly discovered bug