Client fix regressions

Works like before with slightly cleaner code.