CS fixes (cc @naderman)