minor
fix bug in Extract Function