Possible memory bugfix