Fixed #345, Fixed #267.