added flash auto hidding