Fix double free crash