Fixing bugs in tagged photo retrieval
fixed syntax errors there are still logic errors.