#453 #447 Added some guards in an attempt to fix a rendering issue I can't reproduce.