it might be just me but i think that your system is bugged. the quest fuction works fine, but there is a problem:
the /i command tries to directly equip the item on you. when i do /i 299 with an empty inventory it puts the sword in my hand, not in the inventory.