Fixed various bugs with debug worker