Some changes to support #5