Fixed #998

Fixed #998