Improved auto detector