Fixed missing "np." bug in foreground.py