Fix bugs in domfs open context

@rginda