smarter implementation of the fix