Moar memory fixes