improve use of loader flags