Fix display bugs on firefox