fixing variable compile errors