Initial fix for #218

Not really liking the hack, but for now it works