fixed bug when throwExceptionOnMissing flag is enabled