gallery fixes for webkit