fixed misplaced free