Restored some changes that got overwritten