Supress errors when closing buffers, fix #98

Check for the buffer existence before attempting to wipe it out.