Gracefully handle Out of Memory error
Improve button handling