Recommit Quentin's bug fix