fix the order in which the entitiy flags are being read

ah well.. just fixing things as I come across them..