fix a bug in Player when there is no primary resource
Ref #223. Remove primary resource if needed