Test and fix bugs in detab