bug fix Dom and ViewPort