Fix ordering bug in images import