Fixed issue with isset() being used instead of count()