added workarounds for java blank window problem