Fixed object shadowing code