Fix empty model bugs