Fix for active and status sorting