cleanup and bugfix with CCTY getting closed too early
cleanup and bugfix with CCTY getting closed too early

lwgarmstrong/sh,hacosta/python-sh,hacosta/python-sh,pdelong42/sh,jakirkham/sh,z-fork/sh,pombredanne/sh,amoffat/sh,amoffat/sh,rsmith31415/sh,Stupeflix/sh,ppannuto/sh,rdhyee/sh,achernet/sh,simudream/sh,twocngdagz/sh,germangh/sh