Bug fix to support shadow builds properly