Making caps belong to a gallery