Fixes and revert some changes