Port #530 on master, close #529