Fixes for running in windowless environments