bugfix, forgot to reset a variable