fix for a unnoticed memory leak