Fixing problem with metadata ajax call.