fixed compiler issue with free()