Fix providers crash

Fixes #280 and some whitespace