slight leak/bugfix