Small refactor
Fix #518 [deploy snapshot]