Minor fixes

Works like a charm now