Fixed new() function