Fixes to() function.