Fixed #615
Fixed #616