Better debugging and additional test