Fixed a bug on idle image selection.