Fix date sort and hidding if null