Removed unused code, compatibility fix