Fix automator bug and implement clEnqueueCopyBufferRect