Port #250 to master, close #202