Add support for resolve parameter
fix resolve bug with empty name