Fixed memory leak in pow operator