Small fixes, redundant malloc