Fixed the other mallocs with the type explicitly used in sizeof