bugfix for size checks