Ok, I got rid of the block. Btw, 'total' is 0 when nothing was found so it's always true.