Fix panic
& error
, improve allocator
#337
Merged
panic
& error
, improve allocator
#337