Implemented optional anti-ghosting.