Fixes issue when $post does not exist