two bug fixes

1. allow whitespace in metaname value
2. append the direction span instead of replacing all key contents