This appears to be a new member picking up an old (> 6 months) thread.
The quote was unnecessary however.
@siko:
You need to learn some more basics.
If you have a range you want to use, you are the one to tell your Arduino how to handle that range.
So if off is 0, then do not allow the value to go below 0, and if on = 255 do not allow the value to be more than that.
Or if the value is already "out of range", force it back in range before you do anything else with it.
There are multiple ways of handling this.
Everything you need for that is already in the sketch, use your imagination to extend it to fit your needs.
(You just need to add 2 lines).