fixed typo

- improved ranges
- foreground initialization