Fix critical bug, invalid literal for int() with base 10: '' on images save