Fixed bug with format being set to 0. Display of format now uses a direct lookup on the id