Fix bug where rename image file