Fixed major bug with client crashes