Fixed bug exposed by fixing another bug