Better handling of onMetaData