Fixed #311