fixed js for blockUI to be called after all retun null condition