reverted some fixes and added some others