Fix some issues with the ordering and checking for images too early