Fixed Null clients bug, added some state checking