Added check to ensure that client was not null since right now that is null in some cases where the signal does not originate from a client