couple fixes and retro compatibility issue