facial detection fixed; minor bugs fixed; parameters checking added