Better implementation of previous fix.