fix bloom map range and fix portability to Win.