Fixing values used for resizing

@maxfliri