fix ranges