fix bug in pub/draft detection