Due to dereferencing a pointer which may be invalidated
Improve coverage to 100%
Fix #594
Fix VC warnings