fixed null market bug where resource type was incorrectly compared