solve warnings, memory bug (thanks asan!), linux support