Fix gallery code

Signed-off-by: Constantin MUSCĂ <constantin.musca@gmail.com>