fixed issue in apply command with expected class in equal() method