Space leak fix