Added a comment and fixed some bugs in Save to Gallery