Added error-checking/logging for bad selector structure