Fix error notices when post ID isn't found

See #263