Fixes for "missing variable" warnings in some configurations