fix javascript bug, exclusion works