revert some optimizations