memory bug fixes

Add volatile to pointer to prevent memory leak in select responses. Fixed bug
where the UI buffer pointer was not updated when the edit buffer is
reallocated.