finalised fixes for size bug