strangely complaining about double free(), commented out