fixing res id