Fixed #587