Set fix. fixes #887

Works, but I'm not sure if it's a proper fix.