#647 code

https://github.com/hector-client/hector/issues/647