Fixing ErrorBadParameter when executing GetParameter