allocation fixes, not complete