define stack vars as static to be still set in callback func
Merge pull request #450 from koeppea/static-callback-data

Merging