fixed error if minimum or maximum is set to 0