Fixes a stupid memory bug