fix a few bugs and remove meta parameter