Bug fixes for retina display and safari browser