[modified] gallery API bug check