Fixed Legacy Code error