fixing update error

https://github.com/whyi/gallery/issues/62