Fix errors when target Release