fixed clear all exception by confirming instanceof before invoking .clear
closed #21