Implements a bug fix which caused the client to crash.