fix crash bug when no characters need to render
add command line support