Fixed #301, Fixed #271