Fixed some freeing errors