Fixes for correct standalone run