Fixed memory leak in non-arc version