Fixed bug that allowed negative values to be set on certain fields.