Fixed null reference exception in VS 2012 designer