Bug fix for NEXAFS loader