add remarks about debug compilation
Fix ugly bug with memory corruption