Fixed compatbility with Logger when using blocks

This is a rework of #3 after reconciling my fork with master