Clamp out of range values.

Fix double constants.