fixed a bug in popcornlib