fix bug in sub window z position