Fixed #884. Thanks Sakarias