Fixed bug with owned/wanted flags