Fixed all mallocs now