Removes a bug, when a thumbnail ends with its extension two times