Improved replace extensions.