Fixed flush callback array access
Merge pull request #4 from doalex/master

Fixed flush callback array access