fixed errors for calling rendering model before it's loaded.