call before compile callbacks in middleware
Merge pull request #40 from tchak/sprites-fix

call before compile callbacks in middleware