Some changes in here are necessary for previous commit