Use more appropriate free routines