LAST FUNCTION BUG FIX.