updated gallery plugin