Fixed #317