bugfix template for window resize

fixes #341