Added some more compatibility improvements.