Bug fixes

Index out of bounds fix and added worker to client functions.