Fixed target window

When no window name is set, changed return result from top to parent
and fallback is set to window. This was causing issues in IE7/8.