Minor fixes due to old code