Fixed the malloc function.