Fixing broken function.