bugfix: min(X) and max(X) didn't work for smallint data-types