add gallery and fix bug in background