res changes and compatibility fix