fixed bug in backwards compatibility code